Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 83fbe804974e32a5e506565cfd274d6abf32740f


Parents : 25b7fcf
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Date : 2026-05-06T18:45:41+02:00

Strip null bytes from display names by default

Changes

1 files changed, 1 insertions(+), 1 deletions(-)

M LXMF/LXMF.py +1 -1

Diff

diff --git a/LXMF/LXMF.py b/LXMF/LXMF.py
index cdb90a5..2abf087 100644
--- a/LXMF/LXMF.py
+++ b/LXMF/LXMF.py
@@ -128,7 +128,7 @@ def display_name_from_app_data(app_data=None):
if dn == None: return None
else:
try:
- decoded = dn.decode("utf-8")
+ decoded = dn.decode("utf-8").replace("\x00", "").strip()
return decoded
except Exception as e:
RNS.log(f"Could not decode display name in included announce data. The contained exception was: {e}", RNS.LOG_ERROR)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────